package com.liwei.vip.mall.goods.feign;

import com.liwei.mall.util.RespResult;
import com.liwei.vip.mall.goods.model.Sku;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "mall-goods")
public interface SkuFeign {

    /**
     * 根据推广产品分类ID查询指定分类下的产品列表
     * @param id
     * @return
     */
    @GetMapping("/sku/adItems/type")
    List<Sku> typeItems(@RequestParam(value="id") Integer id);

    /**
     * 根据分类id删除指定推广的数据
     * @param id
     * @return
     */
    @DeleteMapping("/sku/adItems/type")
    RespResult deltypeItems(@RequestParam(value="id") Integer id);

    /**
     * 根据分类id修改指定推广数据
     *
     * @param id
     */
    @PutMapping("/sku/adItems/type")
    RespResult updateTypeItems(@RequestParam(value="id") Integer id);
}
